package main.java.com.example.crm.service.impl;

import main.java.com.example.crm.dao.IUserDAO;
import main.java.com.example.crm.dao.daoImpl.UserDAOImpl;
import main.java.com.example.crm.service.UserService;

public class UserviceImpl implements UserService {
    @Override
    public boolean login(String username, String password) {
//        return (int)(Math.random()*2)==0;
        IUserDAO userDAO=new UserDAOImpl();
        boolean result=false;
        try {

             result=userDAO.findByUsernamePassword(username,password);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

}
